<template>
  <ww-open-data v-if="weComState === 'success'" :type="type" :openid="openid" />
  <span v-else>
    {{ openid }}
  </span>
</template>

<script>
import { mapGetters } from 'vuex';
import store from '../../store'

export default {
  props: {
    type: {
      type: String,
      required: true,
    },
    openid: {
      type: [String, Number, Date, Boolean],
      required: true,
    }
  },
  computed: {
    ...mapGetters(['weComState']),
  },
}
</script>
